/* 基础样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  line-height: 1.6;
  color: #333;
}

/* 导航栏样式 */
.navbar {
  background-color: #2c3e50;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
}

.nav-brand {
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
}

.nav-menu {
  display: flex;
  list-style: none;
}

.nav-menu li a {
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  transition: color 0.3s ease;
}

.nav-menu li a:hover {
  color: #3498db;
}

/* 欢迎横幅样式 */
.hero {
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../images/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  height: 400px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: white;
  margin-top: 60px;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

/* 轮播图样式 */
.carousel {
  position: relative;
  max-width: 800px;
  margin: 3rem auto;
  overflow: hidden;
}

.carousel-container {
  display: flex;
  transition: transform 0.5s ease;
}

.carousel-slide {
  min-width: 100%;
  position: relative;
}

.carousel-slide img {
  width: 100%;
  height: 600px;
  object-fit: contain;
  background-color: #f8f9fa;
}

.carousel-slide p {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  text-align: center;
  color: white;
  background: rgba(0, 0, 0, 0.5);
  padding: 10px;
}

.carousel-prev,
.carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  padding: 1rem;
  border: none;
  cursor: pointer;
}

.carousel-prev {
  left: 0;
}

.carousel-next {
  right: 0;
}

/* 表单样式 */
.container {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.script-form {
  background: #f8f9fa;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

.form-group textarea {
  height: 100px;
  resize: vertical;
}

.btn-generate {
  background-color: #3498db;
  color: white;
  padding: 0.8rem 2rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s ease;
}

.btn-generate:hover {
  background-color: #2980b9;
}

/* 输出区域样式 */
.script-output {
  margin-top: 2rem;
  padding: 2rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.loading {
  text-align: center;
  padding: 2rem;
}

.hidden {
  display: none;
}

/* 页脚样式 */
.footer {
  background-color: #2c3e50;
  color: white;
  padding: 2rem 0;
  margin-top: 3rem;
}

.footer-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.social-links {
  margin-top: 1rem;
}

.social-links a {
  color: white;
  margin: 0 0.5rem;
  text-decoration: none;
}

.social-links a:hover {
  color: #3498db;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }

  .hero {
    height: 300px;
  }

  .hero h1 {
    font-size: 2rem;
  }
}

/* 示例页面特定样式 */
.examples-description {
  margin-top: 3rem;
  padding: 2rem;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.examples-description h2 {
  text-align: center;
  margin-bottom: 2rem;
  color: #2c3e50;
}

.example-types {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.example-type {
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 6px;
  transition: transform 0.3s ease;
}

.example-type:hover {
  transform: translateY(-5px);
}

.example-type h3 {
  color: #2c3e50;
  margin-bottom: 1rem;
}

.example-type p {
  color: #666;
  line-height: 1.6;
}

.loading {
    padding: 10px;
    color: #666;
    font-style: italic;
    margin: 10px 0;
}

.chat-message {
    margin: 10px 0;
    padding: 10px;
    border-radius: 8px;
}

.user-message {
    background-color: #e3f2fd;
    margin-left: 20%;
}

.assistant-message {
    background-color: #f5f5f5;
    margin-right: 20%;
}